<?php

namespace app\controllers;

use core\{Session};

class Post extends \core\Controller
{
    public function __construct()
    {
        if (! isLogged()) {
            redirect(url('/login'));
        }
    }

    public function index()
    {
        $this->pageInfo = ['title' => '帖子'];
        $this->view('post/index');
    }

    public function new()
    {
        $this->pageInfo = ['title' => '发新帖'];
        $this->view('post/new');
    }

    public function show()
    {
        $this->pageInfo = ['title' => '帖子内容'];
        $this->view('post/show');
    }
}
